價格:免費
更新日期:2018-06-10
檔案大小:2.3M
目前版本:1.0
版本需求:Android 5.0 以上版本
官方網站:https://ashdavies.io/
Email:android@ashdavies.io
Android Data Binding is considered as both a powerful toolchain, empowering your views with access to view data without the necessity to build cumbersome presenters, and conversely as an overly complex, convoluted mess of binding statements opening the door to unnecessary, irresponsible domain logic in your view layouts.
Whilst the latter of these statements can be true, data binding offers a very powerful code generation syntax, allowing you to utilise the power of the compiler to ensure that your binding statements are runtime safe. Combining this with the concise syntax afforded by Kotlin allows us to dramatically cut down on boilerplate and build complex user interfaces with relative ease.
This application is an example for the Android Data Binding library, making use of Retrofit, Coroutines, Moshi, and Android Jetpack components, to fetch a list of GitHub repositories and update a RecyclerView using the binding methods to display each repository as a view component.
Enter a GitHub username in the ActionBar SearchView component to trigger the observable request, the application uses Retrofit to query the open GitHub API for repositories, results are returned in the RecyclerView with data bindings.